import { createRouter, createWebHistory } from 'vue-router'
import Login from '../pages/Login.vue'
import Manage from '../pages/Manage.vue'
import Caroursel from '../pages/caroursel/index.vue'
import Content from '../pages/content/index.vue';
import ContentOrder from '../pages/content_order/index.vue';
import ChangePwd from '@/pages/system/ChangePwd.vue';
import SystemSet from '@/pages/system/SystemSet.vue';
import Type from '@/pages/type/index.vue';
import User from '@/pages/user/index.vue';
import Role from '@/pages/role/index.vue';
import Function from '@/pages/function/index.vue';
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: Login
    },
    {
      path: '/login',
      name: 'login',
      component: Login
    },
    {
      path: '/manage',
      name: 'manage',
      component: Manage,
      children: [
        {
          path: 'user',
          name: 'user',
          component: User
        },
        {
          path: 'role',
          name: 'role',
          component: Role
        },
        {
          path: 'function',
          name: 'function',
          component: Function
        },
        {
          path: 'type',
          name: 'type',
          component: Type
        },
        {
          path: 'caroursel',
          name: 'caroursel',
          component: Caroursel
        },
        {
          path: 'content',
          name: 'content',
          component: Content
        },
        {
          path: 'content_order',
          name: 'content_order',
          component: ContentOrder
        },
        {
          path: 'changePwd',
          name: 'changePwd',
          component: ChangePwd
        },
        {
          path: 'systemSet',
          name: 'systemSet',
          component: SystemSet
        }
      ]
    }
  ]
})

export default router
